<div class="row">
        <div class="col-xs-12">
          <!-- interactive chart -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">列表</h3>
              <div class="box-tools">
                    <div class="btn-group pull-right" style="margin-right: 10px">
                        <a href="/article/from" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i>&nbsp;&nbsp;新增</a>
                    </div> 
        	</div>
            </div>
            <div class="box-body">
            
            <div class="table-responsive ">
      <table class="table table-hover">
        <thead>
          <tr>
            <th>ID</th>
            <th>标题</th>
            <th>时间</th>
            <th>分类</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
        <?php foreach ($data as $v){?>
        	<tr>
        	<td><?php echo $v['id']?></td>
        	<td><?php echo $v['title']?></td>
        	<td><?php echo date("Y-m-d h:i:s",$v['time'])?></td>
        	<td><?php echo @$v['type'] == 1 ?"默认分类":"---"?></td>
        	<td>
        	<span>
        	<a href="javascript:void(0)" key_id="<?php echo $v['id']?>" class="delete"><i class="fa  fa-trash-o"></i></a>&nbsp;&nbsp;
        	<a href="/article/from/<?php echo $v['id']?>" key_id="<?php echo $v['id']?>" class="edite"><i class="fa  fa-pencil-square-o"></i></a>
        	</span>
        	</td>
        	</tr>
        <?php }?>
        </tbody>
      </table>
    </div>
            </div>
            <!-- /.box-body-->
            
            <div class="box-footer clearfix">
              <ul class="pagination pagination-sm no-margin pull-right">
                    <?php echo @$page;?>
              </ul>
            </div>
            
            
          </div>
          <!-- /.box -->

        </div>
        <!-- /.col -->
      </div>
<script type="text/javascript">
$(".delete").click(function(){
	gajax({
		 type: "get",
		   url: "/article/delete/"+$(this).attr('key_id'),
		   dataType:"json",
		   success: function(data){
			   layer.msg(data.msg);
			   layer.close(index);
			   if(data.status == 1 ){
					setTimeout(function(){
						location.reload(-1)
					},800)
				}
			  
		   }
		})
})

</script>      